In mathematics, a magic hypercube is the dimension generalization of and , that is, an n × n × n × ... × n array of integers such that the sums of the numbers on each pillar (along any axis) as well as on the main are all the same. The common sum is called the magic constant of the hypercube, and is sometimes denoted M k( n). If a magic hypercube consists of the numbers 1, 2, ..., n k, then it has magic number
For k = 4, a magic hypercube may be called a magic tesseract, with sequence of magic numbers given by .
The side-length n of the magic hypercube is called its order. Four-, five-, six-, seven- and eight-dimensional magic hypercubes of order three have been constructed by J. R. Hendricks.
Marian Trenkler proved the following theorem: A p-dimensional magic hypercube of order n exists if and only if p > 1 and n is different from 2 or p = 1. A construction of a magic hypercube follows from the proof.
The R programming language includes a module, library(magic), that will create magic hypercubes of any dimension with n a multiple of 4.
This definition of "perfect" assumes that one of the older definitions for perfect magic cubes is used. The Universal Classification System for Hypercubes (John R. Hendricks) requires that for any dimension hypercube, all possible lines sum correctly for the hypercube to be considered perfect magic. Because of the confusion with the term perfect, nasik is now the preferred term for any magic hypercube where all possible lines sum to S. Nasik was defined in this manner by C. Planck in 1905. A nasik magic hypercube has (3 n − 1) lines of m numbers passing through each of the m n cells.
Or, to put it more concisely, all pan- r-agonals sum correctly for r = 1... n. This definition is the same as the Hendricks definition of perfect, but different from the Boyer/Trump definition.
The term nasik would apply to all dimensions of magic hypercubes in which the number of correctly summing paths (lines) through any cell of the hypercube is P = .
A pandiagonal magic square then would be a nasik square because 4 magic line pass through each of the m2 cells. This was A.H. Frost’s original definition of nasik. A nasik magic cube would have 13 magic lines passing through each of its m3 cells. (This cube also contains 9 m pandiagonal magic squares of order m.) A nasik magic tesseract would have 40 lines passing through each of its m4 cells, and so on.
In 1917, Dr. Planck wrote again on this subject.
In 1939, B. Rosser and R. J. Walker published a series of papers on diabolic (perfect) magic squares and cubes. They specifically mentioned that these cubes contained 13 m2 correctly summing lines. They also had 3 m pandiagonal magic squares parallel to the faces of the cube, and 6 m pandiagonal magic squares parallel to the space diagonal planes.Rosser, B. and Walker, R. J., Magic Squares: Published papers and Supplement, 1939. A bound volume at Cornell University, catalogued as QA 165 R82+pt.1-4
Note: The notation for position can also be used for the value on that position. Then, where it is appropriate, dimension and order can be added to it, thus forming: n k i m
As is indicated k runs through the dimensions, while the coordinate i runs through all possible values, when values i are outside the range it is simply moved back into the range by adding or subtracting appropriate multiples of m, as the magic hypercube resides in n-dimensional modular space.
There can be multiple k between brackets, these cannot have the same value, though in undetermined order, which explains the equality of:
Of course given k also one value i is referred to.
When a specific coordinate value is mentioned the other values can be taken as 0, which is especially the case when the amount of 'k's are limited using pe. # k = 1 as in:
("axial"-neighbor of )
(#j=n-1 can be left unspecified) j now runs through all the values in 0..k-1,k+1..n-1.
Further: without restrictions specified 'k' as well as 'i' run through all possible values, in combinations same letters assume same values. Thus makes it possible to specify a particular line within the hypercube (see r-agonal in pathfinder section)
Note: as far as I know this notation is not in general use yet(?), Hypercubes are not generally analyzed in this particular manner.
Further: " perm(0..n-1)" specifies a permutation of the n numbers 0..n-1.
LPk = ( l=0Σn-1 LPk,l xl + LPk,n ) % mof radix m numbers (also called " digits"). On these LPk's " digit changing" (?i.e. Basic manipulation) are generally applied before these LPk's are combined into the hypercube:
nHm = k=0Σn-1 LPk mk
J.R.Hendricks often uses modular equation, conditions to make hypercubes of various quality can be found on http://www.magichypercubes.com/Encyclopedia at several places (especially p-section)
Both methods fill the hypercube with numbers, the knight-jump guarantees (given appropriate vectors) that every number is present. The Latin prescription only if the components are orthogonal (no two digits occupying the same position)
nHm1 * nHm2 : n[ki]m1m2 = n[ [[ki \ m2]m1m1n]m2 + [ki % m2]m2]m1m2
Most compounding methods can be viewed as variations of the above, As most qualifiers are invariant under multiplication one can for example place any aspectual variant of nHm2 in the above equation, besides that on the result one can apply a manipulation to improve quality. Thus one can specify pe the J. R. Hendricks / M. Trenklar doubling. These things go beyond the scope of this article.
nHm~R perm(0..n-1); R = k=0Σn-1 ((reflect(k)) ? 2k : 0) ; perm(0..n-1) a permutation of 0..n-1Where reflect(k) true iff coordinate k is being reflected, only then 2k is added to R. As is easy to see, only n coordinates can be reflected explaining 2n, the n! permutation of n coordinates explains the other factor to the total amount of "Aspectial variants"!
Aspectial variants are generally seen as being equal. Thus any hypercube can be represented shown in "normal position" by:
[k0] = min([kθ ; θ ε {-1,0}]) (by reflection) [k1 ; #k=1] < [k+11 ; #k=1] ; k = 0..n-2 (by coordinate permutation)(explicitly stated here: k0 the minimum of all corner points. The axial neighbour sequentially based on axial number)
Note: '#', '^', '_' and '=' are essential part of the notation and used as manipulation selectors.
Noted be that reflection is the special case:
~R = _R[n-1,..,0]Further when all the axes undergo the same permutation (R = 2n-1) an n-agonal permutation is achieved, In this special case the 'R' is usually omitted so:
_[perm(0..n-1)] = _(2n-1)[perm(0..n-1)]
Pfp where: p = k=0Σn-1 (ki + 1) 3k <==> <ki> ; i ε {-1,0,1}
This gives 3n directions. since every direction is traversed both ways one can limit to the upper half (3n-1)/2,..,3n-1) of the full range.
With these pathfinders any line to be summed over (or r-agonal) can be specified:
[ j0 kp lq ; #j=1 #k=r-1 ; k > j ] < j1 kθ l0 ; θ ε {-1,1} > ; p,q ε [0,..,m-1]
which specifies all (broken) r-agonals, p and q ranges could be omitted from this description. The main (unbroken) r-agonals are thus given by the slight modification of the above:
[ j0 k0 l-1 sp ; #j=1 #k+#l=r-1 ; k,l > j ] < j1 k1 l-1 s0 >
nSm = m (mn - 1) / 2.
Besides more specific qualifications the following are the most important, "summing" of course stands for "summing correctly to the magic sum"
Note: This series doesn't start with 0 since a nill-agonal doesn't exist, the numbers correspond with the usual name-calling: 1-agonal = monagonal, 2-agonal = diagonal, 3-agonal = triagonal etc.. Aside from this the number correspond to the amount of "-1" and "1" in the corresponding pathfinder.
In case the hypercube also sum when all the numbers are raised to the power p one gets p-multimagic hypercubes. The above qualifiers are simply prepended onto the p-multimagic qualifier. This defines qualifications as {r-agonal 2-magic}. Here also "2-" is usually replaced by "bi", "3-" by "tri" etc. ("1-magic" would be "monomagic" but "mono" is usually omitted). The sum for p-Multimagic hypercubes can be found by using Faulhaber's formula and divide it by mn-1.
Also "magic" (i.e. {1-agonal n-agonal}) is usually assumed, the Trump/Boyer {diagonal} cube is technically seen {1-agonal 2-agonal 3-agonal}.
Nasik magic hypercube gives arguments for using { nasik} as synonymous to { perfect}. The strange generalization of square 'perfect' to using it synonymous to {diagonal} in cubes is however also resolve by putting curly brackets around qualifiers, so { perfect} means {pan r-agonal; r = 1..n} (as mentioned above).
some minor qualifications are:
{ ncompact} might be put in notation as : (k)Σ ji = 2n nSm / m. { ncomplete} can simply be written as: ji + ji = mn - 1 where:
for squares: { 2compact 2complete} is the "modern/alternative qualification" of what Dame Kathleen Ollerenshaw called most-perfect magic square, {ncompact ncomplete} is the qualifier for the feature in more than 2 dimensions.
Caution: some people seems to equate {compact} with {2compact} instead of {ncompact}. Since this introductory article is not the place to discuss these kind of issues I put in the dimensional pre-superscript n to both these qualifiers (which are defined as shown) consequences of {ncompact} is that several figures also sum since they can be formed by adding/subtracting order 2 sub-hyper cubes. Issues like these go beyond this articles scope.
Further: In this article the analytical number range 0..k=0Πn-1mk-1 is being used.
Note: The notation for position can also be used for the value on that position. There where it is appropriate dimension and orders can be added to it thus forming: nkim0,..,mn-1
(m..) abbreviates: m0,..,mn-1. (m..)1(m..)2 abbreviates: m01m02,..,mn-11mn-12.
When any of the orders mk is even, the product is even and thus the only way Sk turns out integer is when all mk are even. Thus suffices: all mk are either even or odd.
This is with the exception of mk=1 of course, which allows for general identities like:
nB(m0..mn-1)~R ; R = k=0Σn-1 ((reflect(k)) ? 2k : 0) ;Where reflect(k) true if and only if coordinate k is being reflected, only then 2k is added to R.
In case one views different orientations of the beam as equal one could view the number of aspects n! 2n just as with the magic hypercubes, directions with equal orders contribute factors depending on the hyperbeam's orders. This goes beyond the scope of this article.
Note: '^' and '_' are essential part of the notation and used as manipulation selectors.
When the orders are not relatively prime the n-agonal sum can be restricted to:
This hyperbeam can be seen as the source of all numbers. A procedure called "Dynamic numbering" makes use of the isomorphism of every hyperbeam with this normal, changing the source, changes the hyperbeam. Basic multiplications of normal hyperbeams play a special role with the "Dynamic numbering" of magic hypercubes of order k=0Πn-1 mk.
|
|